package com.kgame5.xtank3d.app.controll {
import com.kgame5.xtank3d.app.AppEnum;
import com.kgame5.xtank3d.app.view.AppMediator;

import org.puremvc.as3.interfaces.INotification;
import org.puremvc.as3.patterns.command.SimpleCommand;

import flash.display.MovieClip;

/**
 * @author kk
 */
public class StartupCommand extends SimpleCommand{
	public static var NAME:String="StartupCommand";

	public override function execute(e : INotification) : void {
		//--提取参数
		var mc:MovieClip=e.getBody() as MovieClip;
		
		//打开本地数据库
		//RecordStore.open("newtank3d");
		
		
		//====================注册Mediator==================
		//		
		facade.registerMediator(new AppMediator(mc));
		
		//====================启动==================
		//---提取flashVar,rootUrl
		//flashVarCCProxy.init(mc.stage);//这个必须放在最前
		
		//---初始化视图总的模块
		//this.sendNotification(AppEnum.INIT_VIEW,mc);
		
		//---
		this.sendNotification(AppEnum.TURN_PAGE, AppEnum.PAGEID_COVER);
		
	}
}//end of class
}